package com.neusoft.rental.controller;

import com.neusoft.rental.po.User;
import com.neusoft.rental.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/UserController")
public class UserController {

    @Autowired
    private UserService userService;

    //根据学号，学校，密码查找用户
    @RequestMapping("/userQuery")
    public User userQuery(User user){
        return userService.userQuery(user);
    }

    //用户注册时增加用户
    @RequestMapping("/userRegister")
    public int userRegister(User user){
        return userService.userRegister(user);
    }

    //修改用户个人信息
    @RequestMapping("/modifyInformation")
    public int modifyInformation(User user){
        return userService.modifyInformation(user);
    }
}
